package com.app.library.utils;

import android.os.CountDownTimer;

/**
 * @anthor : 大海
 * 每天进步一点点
 * @time :   2020/4/22
 * @description :
 */


public class MyCountdownTimer extends CountDownTimer {
    /**
     * @param millisInFuture    The number of millis in the future from the call
     *                          to {@link #start()} until the countdown is done and {@link #onFinish()}
     *                          is called.
     * @param countDownInterval The interval along the way to receive
     *                          {@link #onTick(long)} callbacks.
     */
    public MyCountdownTimer(long millisInFuture, long countDownInterval) {
        super(millisInFuture, countDownInterval);
    }

    @Override
    public void onTick(long millisUntilFinished) {
        Long s = millisUntilFinished / 1000;
        if (s == 0) {
            onFinish();
        }
//        tv_time.setText(TimeUtil.formatLongToTimeStr(s));
    }

    @Override
    public void onFinish() {

    }
}
